/********************************************************************************
*																				*
*  Las Venturas Playground - callbacks/onPlayerDisconnect.nut					*
*																				*
*  The onPlayerDisconnect callback is located here.								*
*																				*
********************************************************************************/

function onPlayerDisconnect( playerid, reason )
{
	// We set the disconnect reason.
	local sDisconnectReason = "Quit";
	
	if( reason == 1 )
	{
		sDisconnectReason = "Timeout/Crash";
	}
	
	// Inform the rest of the players
	sendMessageToAll ( getPlayerName(playerid) + " has left the server! (" + sDisconnectReason + ")", COLOR_RED, false);
	return 1;
}

addEvent("playerDisconnect", onPlayerDisconnect);